class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.p: C = None
        self.o: C = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.s: F = None
        self.x: G = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: E = None
        self.o: A = None
        self.v: G = None
        self.t: G = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: H = None
        self.r: C = None
        self.p: D = None
        self.o: E = None
        self.z: E = None
        self.q: F = None
        self.u: F = None
        self.txt = txt

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

k = A("k")
b = B("b")
n = C("n")
h = D("h")
c = E("c")
a = F("a")
e = G("e")
f = H("f")

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.s: F = None
        self.x: G = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: E = None
        self.o: A = None
        self.v: G = None
        self.t: G = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: H = None
        self.r: C = None
        self.p: D = None
        self.o: E = None
        self.z: E = None
        self.q: F = None
        self.u: F = None
        self.txt = txt

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

k = A("k")
b = B("b")
n = C("n")
h = D("h")
c = E("c")
a = F("a")
e = G("e")
f = H("f")

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