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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.z: A = None
        self.y: E = None
        self.r: F = None
        self.w: B = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.v: G = None
        self.x: G = None
        self.t: E = None
        self.q: G = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: A = None
        self.p: D = None
        self.o: G = None
        self.txt = txt

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

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

i = A("i")
c = B("c")
g = C("g")
h = D("h")
m = E("m")
n = F("n")
k = G("k")
d = G("d")
j = E("j")
f = A("f")

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.z: A = None
        self.y: E = None
        self.r: F = None
        self.w: B = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.v: G = None
        self.x: G = None
        self.t: E = None
        self.q: G = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: A = None
        self.p: D = None
        self.o: G = None
        self.txt = txt

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

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

i = A("i")
c = B("c")
g = C("g")
h = D("h")
m = E("m")
n = F("n")
k = G("k")
d = G("d")
j = E("j")
f = A("f")

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