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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: H = None
        self.u: C = None
        self.w: D = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = 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.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.z: F = None
        self.y: D = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.z: A = None
        self.t: B = None
        self.txt = txt

e = A("e")
l = B("l")
d = C("d")
n = D("n")
h = E("h")
b = F("b")
j = G("j")
f = H("f")
a = B("a")
g = D("g")

e.u = n
e.r = f
l.v = e
l.y = f
l.u = d
l.w = g
l.p = b
d.s = j
n.t = e
h.w = j
b.q = a
b.u = l
b.y = e
j.w = l
j.q = h
j.z = b
j.y = g
j.u = g
f.y = d
f.u = a
f.t = a
f.z = e
a.v = e
a.y = f
a.u = d
a.w = g
a.p = b
g.t = e
assert j.z.u.p.y.r.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: H = None
        self.u: C = None
        self.w: D = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = 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.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.z: F = None
        self.y: D = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.z: A = None
        self.t: B = None
        self.txt = txt

e = A("e")
l = B("l")
d = C("d")
n = D("n")
h = E("h")
b = F("b")
j = G("j")
f = H("f")
a = B("a")
g = D("g")

e.u = n
e.r = f
l.v = e
l.y = f
l.u = d
l.w = g
l.p = b
d.s = j
n.t = e
h.w = j
b.q = a
b.u = l
b.y = e
j.w = l
j.q = h
j.z = b
j.y = g
j.u = g
f.y = d
f.u = a
f.t = a
f.z = e
a.v = e
a.y = f
a.u = d
a.w = g
a.p = b
g.t = e
assert j.z.u.p.y.r.y.s.txt == "j"