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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: G = None
        self.q: A = None
        self.r: F = None
        self.txt = txt

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

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

e = A("e")
a = B("a")
j = C("j")
k = D("k")
n = E("n")
g = F("g")
d = G("d")
h = D("h")

e.x = g
a.x = g
j.s = e
j.p = e
j.y = h
j.v = k
k.w = h
k.r = h
k.x = g
k.v = j
n.z = d
n.t = d
n.q = e
n.r = g
g.q = k
d.p = j
d.v = k
d.w = a
h.w = k
h.r = k
h.x = g
h.v = j
assert h.v.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: G = None
        self.q: A = None
        self.r: F = None
        self.txt = txt

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

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

e = A("e")
a = B("a")
j = C("j")
k = D("k")
n = E("n")
g = F("g")
d = G("d")
h = D("h")

e.x = g
a.x = g
j.s = e
j.p = e
j.y = h
j.v = k
k.w = h
k.r = h
k.x = g
k.v = j
n.z = d
n.t = d
n.q = e
n.r = g
g.q = k
d.p = j
d.v = k
d.w = a
h.w = k
h.r = k
h.x = g
h.v = j
assert h.v.v.x.txt == "g"