class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: F = None
        self.r: E = None
        self.w: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: D = None
        self.r: C = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: E = None
        self.v: D = None
        self.o: D = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: D = None
        self.r: C = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: E = None
        self.v: D = None
        self.o: D = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

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