class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: D = None
        self.t: D = None
        self.r: G = None
        self.u: I = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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

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

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