class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: F = None
        self.s: D = None
        self.v: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.z: D = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.z: D = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: F = None
        self.txt = txt

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

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