class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: C = None
        self.v: F = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: G = None
        self.x: A = None
        self.o: G = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: G = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

m = A("m")
b = B("b")
h = C("h")
l = D("l")
i = E("i")
n = F("n")
j = G("j")
e = C("e")
k = G("k")
g = D("g")

m.q = j
b.t = n
b.v = n
b.r = h
b.q = i
h.u = k
h.y = j
l.v = n
l.t = n
l.p = n
l.x = b
l.q = g
l.u = j
i.v = j
i.t = j
i.x = m
i.o = k
i.r = n
n.t = m
n.v = b
j.z = n
j.y = k
j.v = g
j.u = b
e.u = k
e.y = j
k.z = n
k.y = j
k.v = g
k.u = b
g.v = n
g.t = n
g.p = n
g.x = b
g.q = l
g.u = j
assert h.u.v.u.u.v.v.r.y.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: C = None
        self.v: F = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: G = None
        self.x: A = None
        self.o: G = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: G = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

m = A("m")
b = B("b")
h = C("h")
l = D("l")
i = E("i")
n = F("n")
j = G("j")
e = C("e")
k = G("k")
g = D("g")

m.q = j
b.t = n
b.v = n
b.r = h
b.q = i
h.u = k
h.y = j
l.v = n
l.t = n
l.p = n
l.x = b
l.q = g
l.u = j
i.v = j
i.t = j
i.x = m
i.o = k
i.r = n
n.t = m
n.v = b
j.z = n
j.y = k
j.v = g
j.u = b
e.u = k
e.y = j
k.z = n
k.y = j
k.v = g
k.u = b
g.v = n
g.t = n
g.p = n
g.x = b
g.q = l
g.u = j
assert h.u.v.u.u.v.v.r.y.y.z.txt == "n"