class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.y: C = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: A = None
        self.u: D = None
        self.o: E = None
        self.q: A = None
        self.s: F = None
        self.z: H = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: D = None
        self.p: B = None
        self.t: D = None
        self.u: E = None
        self.o: A = None
        self.w: B = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: D = None
        self.v: C = None
        self.o: A = None
        self.u: F = None
        self.y: A = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.txt = txt

f = A("f")
e = B("e")
l = C("l")
a = D("a")
i = E("i")
g = F("g")
n = G("n")
j = H("j")

f.q = e
f.r = n
f.t = n
f.y = l
e.y = f
e.r = f
e.q = f
e.u = a
e.o = i
e.s = g
e.p = g
e.z = j
l.t = n
l.o = e
l.y = g
a.x = e
a.u = e
i.v = a
g.s = i
g.u = i
g.x = a
g.t = a
g.p = e
g.w = e
g.o = f
g.z = j
n.p = j
n.z = j
n.s = a
n.v = l
n.o = f
n.y = f
n.u = g
j.w = i
j.u = a
assert g.o.t.u.p.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.y: C = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: A = None
        self.u: D = None
        self.o: E = None
        self.q: A = None
        self.s: F = None
        self.z: H = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: D = None
        self.p: B = None
        self.t: D = None
        self.u: E = None
        self.o: A = None
        self.w: B = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: D = None
        self.v: C = None
        self.o: A = None
        self.u: F = None
        self.y: A = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.txt = txt

f = A("f")
e = B("e")
l = C("l")
a = D("a")
i = E("i")
g = F("g")
n = G("n")
j = H("j")

f.q = e
f.r = n
f.t = n
f.y = l
e.y = f
e.r = f
e.q = f
e.u = a
e.o = i
e.s = g
e.p = g
e.z = j
l.t = n
l.o = e
l.y = g
a.x = e
a.u = e
i.v = a
g.s = i
g.u = i
g.x = a
g.t = a
g.p = e
g.w = e
g.o = f
g.z = j
n.p = j
n.z = j
n.s = a
n.v = l
n.o = f
n.y = f
n.u = g
j.w = i
j.u = a
assert g.o.t.u.p.u.u.txt == "e"