class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: C = None
        self.t: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: I = None
        self.o: E = None
        self.s: H = None
        self.u: C = None
        self.z: F = None
        self.q: E = None
        self.p: F = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: I = None
        self.z: E = None
        self.v: B = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: I = None
        self.o: E = None
        self.s: H = None
        self.u: C = None
        self.z: F = None
        self.q: E = None
        self.p: F = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: I = None
        self.z: E = None
        self.v: B = None
        self.w: E = None
        self.txt = txt

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

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

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

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