class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: B = None
        self.x: F = None
        self.v: G = None
        self.z: C = None
        self.o: I = None
        self.t: E = None
        self.w: G = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: H = None
        self.w: F = None
        self.v: E = None
        self.r: E = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: G = None
        self.s: I = None
        self.w: D = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: H = None
        self.w: F = None
        self.v: E = None
        self.r: E = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: G = None
        self.s: I = None
        self.w: D = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: H = None
        self.txt = txt

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

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