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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: F = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

a = A("a")
h = B("h")
j = C("j")
i = D("i")
g = E("g")
l = F("l")
d = G("d")
k = H("k")

a.x = l
a.y = d
a.t = g
a.v = g
a.p = i
a.u = i
a.s = j
h.x = j
j.y = a
j.s = d
j.t = i
i.t = a
g.r = j
l.z = i
l.t = i
d.r = a
d.s = j
k.q = h
k.t = l
k.p = j
k.y = a
assert h.x.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: G = None
        self.t: E = None
        self.p: D = None
        self.s: C = None
        self.u: D = None
        self.v: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: F = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

a = A("a")
h = B("h")
j = C("j")
i = D("i")
g = E("g")
l = F("l")
d = G("d")
k = H("k")

a.x = l
a.y = d
a.t = g
a.v = g
a.p = i
a.u = i
a.s = j
h.x = j
j.y = a
j.s = d
j.t = i
i.t = a
g.r = j
l.z = i
l.t = i
d.r = a
d.s = j
k.q = h
k.t = l
k.p = j
k.y = a
assert h.x.t.t.txt == "a"