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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.q: D = None
        self.u: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: C = None
        self.s: B = None
        self.v: I = None
        self.x: I = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.q: D = None
        self.u: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: C = None
        self.s: B = None
        self.v: I = None
        self.x: I = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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