class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: C = None
        self.x: C = None
        self.v: B = None
        self.s: E = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: G = None
        self.p: D = None
        self.s: D = None
        self.y: A = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: B = None
        self.y: G = None
        self.p: B = None
        self.x: H = None
        self.u: D = None
        self.v: B = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: E = None
        self.o: C = None
        self.t: F = None
        self.r: F = None
        self.txt = txt

k = A("k")
a = B("a")
f = C("f")
e = D("e")
d = E("d")
c = F("c")
l = G("l")
h = H("h")
i = G("i")

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: G = None
        self.p: D = None
        self.s: D = None
        self.y: A = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: B = None
        self.y: G = None
        self.p: B = None
        self.x: H = None
        self.u: D = None
        self.v: B = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: E = None
        self.o: C = None
        self.t: F = None
        self.r: F = None
        self.txt = txt

k = A("k")
a = B("a")
f = C("f")
e = D("e")
d = E("d")
c = F("c")
l = G("l")
h = H("h")
i = G("i")

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