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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: F = None
        self.t: F = None
        self.v: F = None
        self.s: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: F = None
        self.t: F = None
        self.v: F = None
        self.s: H = None
        self.txt = txt

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

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

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