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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: D = None
        self.y: A = None
        self.z: D = None
        self.s: F = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: D = None
        self.y: A = None
        self.z: D = None
        self.s: F = None
        self.u: A = None
        self.txt = txt

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

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

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

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