class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: C = None
        self.y: F = None
        self.w: F = None
        self.u: C = None
        self.q: E = None
        self.z: C = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: E = None
        self.z: A = None
        self.x: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: G = None
        self.w: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: C = None
        self.p: B = None
        self.q: I = None
        self.x: G = None
        self.o: C = None
        self.y: G = None
        self.r: G = None
        self.txt = txt

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

m.o = j
m.q = j
m.p = f
m.u = f
m.z = f
m.y = i
m.w = i
m.r = c
h.s = i
h.v = j
h.z = m
h.x = d
f.x = k
d.w = f
j.t = f
i.t = g
i.q = n
i.w = n
n.z = m
g.t = f
g.u = h
c.s = j
c.t = f
c.o = f
c.p = h
c.q = k
c.x = n
c.y = n
c.r = n
k.s = j
k.t = f
k.o = f
k.p = h
k.q = c
k.x = n
k.y = n
k.r = n
assert n.z.o.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: C = None
        self.y: F = None
        self.w: F = None
        self.u: C = None
        self.q: E = None
        self.z: C = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: E = None
        self.z: A = None
        self.x: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: G = None
        self.w: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: C = None
        self.p: B = None
        self.q: I = None
        self.x: G = None
        self.o: C = None
        self.y: G = None
        self.r: G = None
        self.txt = txt

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

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