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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: H = None
        self.o: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: H = None
        self.w: D = None
        self.u: G = None
        self.t: H = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: A = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: A = None
        self.v: B = None
        self.z: B = None
        self.txt = txt

j = A("j")
c = B("c")
i = C("i")
f = D("f")
b = E("b")
k = F("k")
d = G("d")
g = H("g")

j.s = k
j.o = f
j.w = d
c.v = g
c.y = j
c.u = j
c.z = f
c.q = k
i.q = d
i.p = g
i.z = c
f.u = b
f.r = g
f.v = c
b.p = k
b.o = k
b.r = g
b.t = j
k.r = j
k.p = g
k.t = g
k.s = g
k.w = f
k.u = d
d.o = j
d.w = j
d.v = k
g.o = d
g.p = j
g.v = c
g.z = c
assert d.o.o.u.r.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: D = None
        self.w: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: H = None
        self.o: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: H = None
        self.w: D = None
        self.u: G = None
        self.t: H = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: A = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: A = None
        self.v: B = None
        self.z: B = None
        self.txt = txt

j = A("j")
c = B("c")
i = C("i")
f = D("f")
b = E("b")
k = F("k")
d = G("d")
g = H("g")

j.s = k
j.o = f
j.w = d
c.v = g
c.y = j
c.u = j
c.z = f
c.q = k
i.q = d
i.p = g
i.z = c
f.u = b
f.r = g
f.v = c
b.p = k
b.o = k
b.r = g
b.t = j
k.r = j
k.p = g
k.t = g
k.s = g
k.w = f
k.u = d
d.o = j
d.w = j
d.v = k
g.o = d
g.p = j
g.v = c
g.z = c
assert d.o.o.u.r.p.txt == "j"