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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: G = None
        self.z: F = None
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: G = None
        self.z: F = None
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

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

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