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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: G = None
        self.z: A = None
        self.y: I = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: G = None
        self.u: C = None
        self.v: H = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: D = None
        self.z: E = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: I = None
        self.p: F = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: G = None
        self.y: E = None
        self.r: G = None
        self.u: E = None
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: G = None
        self.z: A = None
        self.y: I = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: G = None
        self.u: C = None
        self.v: H = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: D = None
        self.z: E = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: I = None
        self.p: F = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: G = None
        self.y: E = None
        self.r: G = None
        self.u: E = None
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

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