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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: F = None
        self.w: F = None
        self.q: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

m = A("m")
g = B("g")
n = C("n")
l = D("l")
i = E("i")
k = F("k")
h = G("h")
b = H("b")
c = E("c")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: F = None
        self.w: F = None
        self.q: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

m = A("m")
g = B("g")
n = C("n")
l = D("l")
i = E("i")
k = F("k")
h = G("h")
b = H("b")
c = E("c")

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