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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: C = None
        self.y: D = None
        self.r: E = None
        self.u: G = None
        self.t: H = None
        self.q: G = None
        self.s: A = None
        self.z: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: G = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: C = None
        self.y: D = None
        self.r: E = None
        self.u: G = None
        self.t: H = None
        self.q: G = None
        self.s: A = None
        self.z: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: G = None
        self.p: F = None
        self.txt = txt

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

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