class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.p: B = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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