class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: I = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.o: C = None
        self.x: G = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: C = None
        self.r: C = None
        self.y: C = None
        self.x: D = None
        self.p: F = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: I = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.o: C = None
        self.x: G = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: C = None
        self.r: C = None
        self.y: C = None
        self.x: D = None
        self.p: F = None
        self.s: B = None
        self.txt = txt

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

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