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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: D = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.z: A = None
        self.v: A = None
        self.r: A = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: C = None
        self.t: F = None
        self.r: H = None
        self.v: B = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.x: C = None
        self.u: H = None
        self.t: C = None
        self.s: D = None
        self.p: H = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.v: B = None
        self.s: C = None
        self.y: D = None
        self.p: C = None
        self.z: G = None
        self.u: G = None
        self.txt = txt

b = A("b")
g = B("g")
k = C("k")
j = D("j")
l = E("l")
f = F("f")
c = G("c")
a = H("a")
h = B("h")

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: D = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.z: A = None
        self.v: A = None
        self.r: A = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: C = None
        self.t: F = None
        self.r: H = None
        self.v: B = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.x: C = None
        self.u: H = None
        self.t: C = None
        self.s: D = None
        self.p: H = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.v: B = None
        self.s: C = None
        self.y: D = None
        self.p: C = None
        self.z: G = None
        self.u: G = None
        self.txt = txt

b = A("b")
g = B("g")
k = C("k")
j = D("j")
l = E("l")
f = F("f")
c = G("c")
a = H("a")
h = B("h")

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