class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: G = None
        self.y: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: A = None
        self.s: B = None
        self.o: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: A = None
        self.s: B = None
        self.o: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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