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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: E = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: E = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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