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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: C = None
        self.t: C = None
        self.y: C = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.z: B = None
        self.o: A = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: C = None
        self.t: C = None
        self.y: C = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.z: B = None
        self.o: A = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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