class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: G = None
        self.y: C = None
        self.p: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: E = None
        self.x: C = None
        self.w: C = None
        self.q: B = None
        self.s: E = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: A = None
        self.r: G = None
        self.p: B = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: E = None
        self.x: C = None
        self.w: C = None
        self.q: B = None
        self.s: E = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: A = None
        self.r: G = None
        self.p: B = None
        self.x: D = None
        self.txt = txt

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

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

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

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