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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.txt = txt

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

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

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