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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: D = None
        self.o: D = None
        self.t: B = None
        self.x: F = None
        self.p: F = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: D = None
        self.o: D = None
        self.t: B = None
        self.x: F = None
        self.p: F = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

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

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