class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: D = None
        self.z: G = None
        self.o: F = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

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