class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: A = None
        self.v: E = None
        self.w: D = None
        self.z: G = None
        self.t: G = None
        self.x: F = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.s: B = None
        self.v: B = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: A = None
        self.v: E = None
        self.w: D = None
        self.z: G = None
        self.t: G = None
        self.x: F = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.s: B = None
        self.v: B = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: F = None
        self.txt = txt

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

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