class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: F = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: A = None
        self.t: E = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: G = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: D = None
        self.z: H = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: C = None
        self.r: D = None
        self.o: E = None
        self.q: G = None
        self.x: D = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: A = None
        self.t: E = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: G = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: D = None
        self.z: H = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: C = None
        self.r: D = None
        self.o: E = None
        self.q: G = None
        self.x: D = None
        self.p: D = None
        self.txt = txt

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

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