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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: A = None
        self.s: F = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: A = None
        self.s: F = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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