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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

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

d = A("d")
i = B("i")
j = C("j")
e = B("e")
g = B("g")
b = B("b")
a = A("a")
m = B("m")
l = B("l")
k = B("k")

d.t = a
d.y = j
d.v = j
i.z = d
i.t = m
i.w = j
j.s = a
e.z = d
e.t = m
e.w = j
g.z = a
g.t = m
g.w = j
b.z = d
b.t = k
b.w = j
a.t = d
a.y = j
a.v = j
m.z = a
m.t = g
m.w = j
l.z = a
l.t = i
l.w = j
k.z = a
k.t = i
k.w = j
assert e.w.s.y.s.t.v.s.t.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

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

d = A("d")
i = B("i")
j = C("j")
e = B("e")
g = B("g")
b = B("b")
a = A("a")
m = B("m")
l = B("l")
k = B("k")

d.t = a
d.y = j
d.v = j
i.z = d
i.t = m
i.w = j
j.s = a
e.z = d
e.t = m
e.w = j
g.z = a
g.t = m
g.w = j
b.z = d
b.t = k
b.w = j
a.t = d
a.y = j
a.v = j
m.z = a
m.t = g
m.w = j
l.z = a
l.t = i
l.w = j
k.z = a
k.t = i
k.w = j
assert e.w.s.y.s.t.v.s.t.t.t.txt == "d"