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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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