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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.x: A = None
        self.w: F = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: A = None
        self.z: E = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.x: A = None
        self.w: F = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: A = None
        self.z: E = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

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

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