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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: D = None
        self.x: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: D = None
        self.x: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

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

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

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