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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: E = None
        self.r: I = None
        self.q: B = None
        self.p: H = None
        self.s: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: H = None
        self.r: A = None
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: G = None
        self.q: D = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: H = None
        self.y: C = None
        self.p: C = None
        self.w: I = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: F = None
        self.r: I = None
        self.p: B = None
        self.u: E = None
        self.x: D = None
        self.s: I = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: E = None
        self.z: D = None
        self.w: E = None
        self.x: D = None
        self.u: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: E = None
        self.r: I = None
        self.q: B = None
        self.p: H = None
        self.s: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: H = None
        self.r: A = None
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: G = None
        self.q: D = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: H = None
        self.y: C = None
        self.p: C = None
        self.w: I = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: F = None
        self.r: I = None
        self.p: B = None
        self.u: E = None
        self.x: D = None
        self.s: I = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: E = None
        self.z: D = None
        self.w: E = None
        self.x: D = None
        self.u: B = None
        self.txt = txt

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

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