class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: G = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: B = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: B = None
        self.y: D = None
        self.txt = txt

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

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