class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: G = None
        self.t: F = None
        self.w: H = None
        self.s: H = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.u: H = None
        self.s: A = None
        self.y: D = None
        self.p: C = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: D = None
        self.p: E = None
        self.x: D = None
        self.y: E = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.u: H = None
        self.s: A = None
        self.y: D = None
        self.p: C = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: D = None
        self.p: E = None
        self.x: D = None
        self.y: E = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: D = None
        self.txt = txt

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

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