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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: E = None
        self.z: F = None
        self.u: E = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: E = None
        self.z: F = None
        self.u: E = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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