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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: H = None
        self.x: B = None
        self.y: I = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: H = None
        self.x: B = None
        self.y: I = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: C = None
        self.txt = txt

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

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