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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.t: A = None
        self.p: D = None
        self.r: D = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: B = None
        self.r: F = None
        self.u: B = None
        self.q: A = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: C = None
        self.x: A = None
        self.z: B = None
        self.p: B = None
        self.v: A = None
        self.txt = txt

a = A("a")
b = B("b")
h = C("h")
m = D("m")
e = E("e")
c = F("c")
g = G("g")
n = G("n")

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.t: A = None
        self.p: D = None
        self.r: D = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: B = None
        self.r: F = None
        self.u: B = None
        self.q: A = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: C = None
        self.x: A = None
        self.z: B = None
        self.p: B = None
        self.v: A = None
        self.txt = txt

a = A("a")
b = B("b")
h = C("h")
m = D("m")
e = E("e")
c = F("c")
g = G("g")
n = G("n")

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