class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: E = None
        self.q: H = None
        self.r: F = None
        self.u: F = None
        self.w: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.q: A = None
        self.x: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: E = None
        self.q: H = None
        self.r: F = None
        self.u: F = None
        self.w: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.q: A = None
        self.x: A = None
        self.o: F = None
        self.txt = txt

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

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

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