class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: A = None
        self.r: G = None
        self.v: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: C = None
        self.y: F = None
        self.s: B = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: D = None
        self.x: G = None
        self.s: A = None
        self.v: B = None
        self.y: B = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: D = None
        self.x: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: A = None
        self.r: G = None
        self.v: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: C = None
        self.y: F = None
        self.s: B = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: D = None
        self.x: G = None
        self.s: A = None
        self.v: B = None
        self.y: B = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: D = None
        self.x: I = None
        self.txt = txt

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

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

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

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