class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: C = None
        self.x: F = None
        self.q: F = None
        self.y: D = None
        self.p: H = None
        self.w: G = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: D = None
        self.t: A = None
        self.p: B = None
        self.v: E = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: D = None
        self.t: A = None
        self.p: B = None
        self.v: E = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

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