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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.t: I = None
        self.v: I = None
        self.q: F = None
        self.p: C = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

g.x = i
g.t = i
g.o = i
e.s = g
k.y = i
k.v = e
b.q = g
b.x = i
d.x = i
d.s = i
d.q = i
d.t = m
d.v = m
d.p = k
d.w = b
i.o = m
n.t = d
a.v = b
m.r = b
assert k.v.s.x.o.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: F = None
        self.o: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.t: I = None
        self.v: I = None
        self.q: F = None
        self.p: C = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

g.x = i
g.t = i
g.o = i
e.s = g
k.y = i
k.v = e
b.q = g
b.x = i
d.x = i
d.s = i
d.q = i
d.t = m
d.v = m
d.p = k
d.w = b
i.o = m
n.t = d
a.v = b
m.r = b
assert k.v.s.x.o.r.txt == "b"