class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: E = None
        self.w: I = None
        self.x: C = None
        self.r: C = None
        self.s: D = None
        self.o: E = None
        self.p: D = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: G = None
        self.u: D = None
        self.o: A = None
        self.v: I = None
        self.p: B = None
        self.w: I = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.p: I = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: C = None
        self.r: I = None
        self.q: E = None
        self.txt = txt

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

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

j = A("j")
m = B("m")
h = C("h")
b = D("b")
c = E("c")
f = F("f")
e = G("e")
l = H("l")
k = I("k")
d = E("d")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: G = None
        self.u: D = None
        self.o: A = None
        self.v: I = None
        self.p: B = None
        self.w: I = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.p: I = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: C = None
        self.r: I = None
        self.q: E = None
        self.txt = txt

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

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

j = A("j")
m = B("m")
h = C("h")
b = D("b")
c = E("c")
f = F("f")
e = G("e")
l = H("l")
k = I("k")
d = E("d")

j.v = m
j.u = c
j.w = k
j.x = h
j.r = h
j.y = h
j.s = b
j.p = b
j.o = d
m.z = b
m.s = b
h.z = e
h.x = e
h.t = e
h.u = b
h.o = j
h.y = j
h.v = k
h.w = k
h.p = m
b.z = f
c.v = h
c.x = d
c.p = k
c.q = k
f.p = l
e.u = k
e.r = k
e.o = h
e.q = c
l.o = b
l.p = c
k.v = j
d.v = h
d.x = c
d.p = k
d.q = k
assert c.p.v.x.v.v.w.v.x.p.z.txt == "b"