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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: B = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: D = None
        self.w: C = None
        self.x: C = None
        self.txt = txt

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

f = A("f")
e = B("e")
g = C("g")
a = D("a")
k = E("k")
i = F("i")
c = C("c")
d = A("d")
m = D("m")
l = B("l")

f.t = l
f.p = a
f.q = a
f.u = e
e.r = c
e.y = l
e.u = m
g.r = c
g.y = c
g.z = l
g.p = i
g.o = i
g.v = f
a.p = f
a.v = l
a.o = k
a.t = d
k.q = l
k.s = m
k.w = g
k.x = g
i.w = f
i.s = c
i.v = e
c.r = g
c.y = g
c.z = l
c.p = i
c.o = i
c.v = f
d.t = e
d.u = e
d.p = m
d.q = a
m.p = f
m.t = f
m.v = l
m.o = k
l.r = c
l.y = e
l.u = a
assert e.u.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: D = None
        self.u: B = None
        self.q: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: B = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: D = None
        self.w: C = None
        self.x: C = None
        self.txt = txt

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

f = A("f")
e = B("e")
g = C("g")
a = D("a")
k = E("k")
i = F("i")
c = C("c")
d = A("d")
m = D("m")
l = B("l")

f.t = l
f.p = a
f.q = a
f.u = e
e.r = c
e.y = l
e.u = m
g.r = c
g.y = c
g.z = l
g.p = i
g.o = i
g.v = f
a.p = f
a.v = l
a.o = k
a.t = d
k.q = l
k.s = m
k.w = g
k.x = g
i.w = f
i.s = c
i.v = e
c.r = g
c.y = g
c.z = l
c.p = i
c.o = i
c.v = f
d.t = e
d.u = e
d.p = m
d.q = a
m.p = f
m.t = f
m.v = l
m.o = k
l.r = c
l.y = e
l.u = a
assert e.u.v.y.txt == "e"