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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.t: D = None
        self.y: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.t: D = None
        self.y: A = None
        self.p: D = None
        self.txt = txt

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

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

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