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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: A = None
        self.t: H = None
        self.r: I = None
        self.y: F = None
        self.q: G = None
        self.v: D = None
        self.u: 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.w: F = None
        self.u: A = None
        self.p: H = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: B = None
        self.p: A = None
        self.r: H = None
        self.q: H = None
        self.u: D = None
        self.t: A = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.z: G = None
        self.o: B = None
        self.x: E = None
        self.w: G = None
        self.u: I = None
        self.q: A = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: H = None
        self.v: F = None
        self.o: F = None
        self.y: C = None
        self.u: H = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: A = None
        self.t: H = None
        self.r: I = None
        self.y: F = None
        self.q: G = None
        self.v: D = None
        self.u: 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.w: F = None
        self.u: A = None
        self.p: H = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: B = None
        self.p: A = None
        self.r: H = None
        self.q: H = None
        self.u: D = None
        self.t: A = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.z: G = None
        self.o: B = None
        self.x: E = None
        self.w: G = None
        self.u: I = None
        self.q: A = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: H = None
        self.v: F = None
        self.o: F = None
        self.y: C = None
        self.u: H = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

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

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