class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: D = None
        self.t: I = None
        self.s: B = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.x: G = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: B = None
        self.x: D = None
        self.txt = txt

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

d.o = m
d.p = m
d.t = b
d.s = k
d.w = n
k.q = a
k.w = n
k.x = n
k.u = l
j.o = l
m.x = k
l.r = c
l.s = n
c.v = n
c.s = b
c.o = d
n.r = m
n.y = l
n.v = k
a.q = n
a.s = l
b.p = k
b.s = k
b.x = m
assert b.p.q.q.r.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: D = None
        self.t: I = None
        self.s: B = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.x: G = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: B = None
        self.x: D = None
        self.txt = txt

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

d.o = m
d.p = m
d.t = b
d.s = k
d.w = n
k.q = a
k.w = n
k.x = n
k.u = l
j.o = l
m.x = k
l.r = c
l.s = n
c.v = n
c.s = b
c.o = d
n.r = m
n.y = l
n.v = k
a.q = n
a.s = l
b.p = k
b.s = k
b.x = m
assert b.p.q.q.r.x.u.txt == "l"