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

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: F = None
        self.z: E = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: H = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: F = None
        self.z: E = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: H = None
        self.u: A = None
        self.txt = txt

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

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

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

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

a.y = i
a.o = j
a.t = j
a.u = g
d.y = j
d.w = j
d.p = a
d.s = a
d.x = k
d.z = b
d.q = i
g.q = k
f.w = k
f.y = k
f.v = j
f.z = i
i.x = f
i.y = k
i.u = a
j.p = g
j.u = f
j.s = d
b.t = i
b.o = i
k.w = j
k.t = a
k.r = g
assert b.t.y.w.p.q.t.txt == "a"