class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

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