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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: G = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: G = None
        self.y: G = None
        self.w: D = None
        self.s: G = None
        self.txt = txt

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

l.p = m
l.x = f
l.z = e
l.y = e
l.s = a
l.v = d
l.o = g
e.y = a
j.u = e
j.y = g
j.o = l
a.v = g
a.o = g
a.z = l
a.y = j
a.s = j
a.w = f
g.v = f
g.t = l
d.o = e
d.v = f
d.s = l
d.z = j
f.x = d
f.t = l
m.z = g
m.r = f
m.y = f
m.s = f
m.w = a
assert m.w.w.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: G = None
        self.z: B = None
        self.y: B = None
        self.s: D = None
        self.v: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: G = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: G = None
        self.y: G = None
        self.w: D = None
        self.s: G = None
        self.txt = txt

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

l.p = m
l.x = f
l.z = e
l.y = e
l.s = a
l.v = d
l.o = g
e.y = a
j.u = e
j.y = g
j.o = l
a.v = g
a.o = g
a.z = l
a.y = j
a.s = j
a.w = f
g.v = f
g.t = l
d.o = e
d.v = f
d.s = l
d.z = j
f.x = d
f.t = l
m.z = g
m.r = f
m.y = f
m.s = f
m.w = a
assert m.w.w.x.s.txt == "l"