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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: F = None
        self.w: D = None
        self.x: F = None
        self.z: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

i = A("i")
m = B("m")
a = C("a")
d = D("d")
l = E("l")
g = F("g")
k = A("k")
c = C("c")
j = D("j")

i.w = k
m.q = d
m.p = a
m.t = l
m.w = g
a.p = c
a.r = k
a.t = d
a.o = j
d.s = l
d.q = l
d.v = m
d.u = m
d.o = g
d.w = j
l.v = c
l.p = g
l.x = g
l.z = g
l.o = g
l.w = j
g.y = m
k.w = i
c.p = a
c.r = k
c.t = j
c.o = d
j.s = l
j.q = l
j.v = m
j.u = m
j.o = g
j.w = d
assert d.w.s.p.y.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: F = None
        self.w: D = None
        self.x: F = None
        self.z: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

i = A("i")
m = B("m")
a = C("a")
d = D("d")
l = E("l")
g = F("g")
k = A("k")
c = C("c")
j = D("j")

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