class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.s: C = None
        self.y: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: H = None
        self.o: H = None
        self.w: A = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.z: A = None
        self.w: E = None
        self.r: A = None
        self.s: G = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: H = None
        self.o: H = None
        self.w: A = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.z: A = None
        self.w: E = None
        self.r: A = None
        self.s: G = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.txt = txt

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

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