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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.z: F = None
        self.v: B = None
        self.txt = txt

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

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

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

i = A("i")
b = B("b")
l = C("l")
h = D("h")
d = E("d")
j = F("j")
m = E("m")
f = F("f")
g = B("g")

i.q = h
i.t = h
i.p = b
i.v = l
b.u = i
b.o = i
l.w = d
l.q = i
l.z = j
l.v = b
h.r = i
h.p = i
h.y = i
h.o = b
h.t = l
d.v = f
d.x = j
d.w = h
d.z = b
d.y = i
d.p = l
j.x = m
j.v = h
m.v = f
m.x = f
m.w = h
m.z = g
m.y = i
m.p = l
f.x = m
f.v = h
g.u = i
g.o = i
assert d.w.o.o.q.o.o.v.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: B = None
        self.t: D = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.z: F = None
        self.v: B = None
        self.txt = txt

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

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

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

i = A("i")
b = B("b")
l = C("l")
h = D("h")
d = E("d")
j = F("j")
m = E("m")
f = F("f")
g = B("g")

i.q = h
i.t = h
i.p = b
i.v = l
b.u = i
b.o = i
l.w = d
l.q = i
l.z = j
l.v = b
h.r = i
h.p = i
h.y = i
h.o = b
h.t = l
d.v = f
d.x = j
d.w = h
d.z = b
d.y = i
d.p = l
j.x = m
j.v = h
m.v = f
m.x = f
m.w = h
m.z = g
m.y = i
m.p = l
f.x = m
f.v = h
g.u = i
g.o = i
assert d.w.o.o.q.o.o.v.v.u.txt == "i"