class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: C = None
        self.o: G = None
        self.w: H = None
        self.t: E = None
        self.v: E = None
        self.p: A = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: H = None
        self.s: G = None
        self.v: G = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: H = None
        self.u: A = None
        self.y: A = None
        self.x: E = None
        self.q: E = None
        self.w: H = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: D = None
        self.u: D = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.q: F = None
        self.x: D = None
        self.p: C = None
        self.u: B = None
        self.txt = txt

m = A("m")
l = B("l")
a = C("a")
b = D("b")
g = E("g")
j = F("j")
c = G("c")
n = H("n")

m.u = c
m.y = n
l.q = g
l.t = g
l.v = g
l.z = a
l.s = a
l.o = c
l.w = n
l.p = m
a.t = l
a.x = n
a.s = c
a.v = c
a.u = c
b.z = n
b.t = n
b.w = n
b.u = m
b.y = m
b.x = g
b.q = g
b.p = g
g.y = j
g.p = b
g.u = b
g.t = c
j.z = n
c.s = l
c.u = m
n.v = a
n.o = a
n.p = a
n.q = j
n.x = b
n.u = l
assert g.t.u.y.x.x.u.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: C = None
        self.o: G = None
        self.w: H = None
        self.t: E = None
        self.v: E = None
        self.p: A = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: H = None
        self.s: G = None
        self.v: G = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: H = None
        self.u: A = None
        self.y: A = None
        self.x: E = None
        self.q: E = None
        self.w: H = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: D = None
        self.u: D = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.q: F = None
        self.x: D = None
        self.p: C = None
        self.u: B = None
        self.txt = txt

m = A("m")
l = B("l")
a = C("a")
b = D("b")
g = E("g")
j = F("j")
c = G("c")
n = H("n")

m.u = c
m.y = n
l.q = g
l.t = g
l.v = g
l.z = a
l.s = a
l.o = c
l.w = n
l.p = m
a.t = l
a.x = n
a.s = c
a.v = c
a.u = c
b.z = n
b.t = n
b.w = n
b.u = m
b.y = m
b.x = g
b.q = g
b.p = g
g.y = j
g.p = b
g.u = b
g.t = c
j.z = n
c.s = l
c.u = m
n.v = a
n.o = a
n.p = a
n.q = j
n.x = b
n.u = l
assert g.t.u.y.x.x.u.y.y.txt == "n"