class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: C = None
        self.s: E = None
        self.v: E = None
        self.y: G = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: E = None
        self.y: F = None
        self.r: G = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: D = None
        self.p: F = None
        self.z: G = None
        self.q: F = None
        self.y: C = None
        self.w: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: B = None
        self.z: G = None
        self.u: F = None
        self.y: D = None
        self.p: B = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: E = None
        self.y: F = None
        self.r: G = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: D = None
        self.p: F = None
        self.z: G = None
        self.q: F = None
        self.y: C = None
        self.w: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: B = None
        self.z: G = None
        self.u: F = None
        self.y: D = None
        self.p: B = None
        self.w: C = None
        self.txt = txt

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

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