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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: A = None
        self.y: F = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: D = None
        self.w: A = None
        self.x: H = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: F = None
        self.s: D = None
        self.t: H = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: A = None
        self.y: F = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: D = None
        self.w: A = None
        self.x: H = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: F = None
        self.s: D = None
        self.t: H = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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