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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.r: C = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

i = A("i")
n = B("n")
f = C("f")
l = D("l")
a = B("a")
e = C("e")
j = C("j")
h = B("h")
b = C("b")
d = B("d")

i.t = l
n.v = h
n.x = a
n.r = f
n.w = l
f.q = i
f.z = e
f.y = a
f.x = b
l.x = b
a.v = h
a.x = n
a.r = j
a.w = l
e.q = i
e.z = f
e.y = a
e.x = j
j.q = i
j.z = e
j.y = d
j.x = f
h.v = n
h.x = a
h.r = f
h.w = l
b.q = i
b.z = f
b.y = h
b.x = j
d.v = a
d.x = n
d.r = j
d.w = l
assert a.w.x.q.t.x.q.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.r: C = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

i = A("i")
n = B("n")
f = C("f")
l = D("l")
a = B("a")
e = C("e")
j = C("j")
h = B("h")
b = C("b")
d = B("d")

i.t = l
n.v = h
n.x = a
n.r = f
n.w = l
f.q = i
f.z = e
f.y = a
f.x = b
l.x = b
a.v = h
a.x = n
a.r = j
a.w = l
e.q = i
e.z = f
e.y = a
e.x = j
j.q = i
j.z = e
j.y = d
j.x = f
h.v = n
h.x = a
h.r = f
h.w = l
b.q = i
b.z = f
b.y = h
b.x = j
d.v = a
d.x = n
d.r = j
d.w = l
assert a.w.x.q.t.x.q.t.x.txt == "b"