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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.o: F = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: H = None
        self.t: E = None
        self.v: C = None
        self.o: B = None
        self.u: F = None
        self.x: H = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.o: F = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: H = None
        self.t: E = None
        self.v: C = None
        self.o: B = None
        self.u: F = None
        self.x: H = None
        self.q: B = None
        self.txt = txt

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

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

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