class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: H = None
        self.p: H = None
        self.s: H = None
        self.v: C = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.v: F = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: A = None
        self.q: E = None
        self.y: E = None
        self.u: G = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: C = None
        self.x: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: C = None
        self.w: G = None
        self.r: B = None
        self.o: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.v: F = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: A = None
        self.q: E = None
        self.y: E = None
        self.u: G = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: C = None
        self.x: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: C = None
        self.w: G = None
        self.r: B = None
        self.o: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.txt = txt

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

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

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