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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.u: E = None
        self.o: H = None
        self.w: F = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: E = None
        self.o: G = None
        self.y: A = None
        self.p: H = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: D = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.u: E = None
        self.o: H = None
        self.w: F = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: E = None
        self.o: G = None
        self.y: A = None
        self.p: H = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: D = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

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