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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: C = None
        self.u: E = None
        self.txt = txt

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

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