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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: D = None
        self.o: B = None
        self.x: B = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: E = None
        self.u: F = None
        self.p: B = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: D = None
        self.o: B = None
        self.x: B = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: E = None
        self.u: F = None
        self.p: B = None
        self.t: D = None
        self.txt = txt

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

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