class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.u: E = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: I = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: F = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.u: F = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: I = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: F = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.u: F = None
        self.s: F = None
        self.txt = txt

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

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