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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.y: B = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: E = None
        self.s: E = None
        self.u: D = None
        self.x: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: D = None
        self.txt = txt

a = A("a")
d = B("d")
i = C("i")
k = D("k")
h = E("h")
c = F("c")
b = A("b")
n = E("n")
j = E("j")

a.t = i
a.p = i
a.y = h
a.q = c
d.w = h
d.p = k
d.o = c
i.s = d
k.s = d
k.o = d
k.y = d
k.q = i
h.r = k
h.u = k
h.o = j
h.s = j
h.x = n
c.x = b
c.o = k
b.t = i
b.p = i
b.y = n
b.q = c
n.r = k
n.u = k
n.o = h
n.s = j
n.x = j
j.r = k
j.u = k
j.o = n
j.s = n
j.x = n
assert d.o.o.q.s.w.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: E = None
        self.p: C = None
        self.q: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.y: B = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: E = None
        self.s: E = None
        self.u: D = None
        self.x: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: D = None
        self.txt = txt

a = A("a")
d = B("d")
i = C("i")
k = D("k")
h = E("h")
c = F("c")
b = A("b")
n = E("n")
j = E("j")

a.t = i
a.p = i
a.y = h
a.q = c
d.w = h
d.p = k
d.o = c
i.s = d
k.s = d
k.o = d
k.y = d
k.q = i
h.r = k
h.u = k
h.o = j
h.s = j
h.x = n
c.x = b
c.o = k
b.t = i
b.p = i
b.y = n
b.q = c
n.r = k
n.u = k
n.o = h
n.s = j
n.x = j
j.r = k
j.u = k
j.o = n
j.s = n
j.x = n
assert d.o.o.q.s.w.x.u.txt == "k"