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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: F = None
        self.t: D = None
        self.o: E = None
        self.x: G = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: B = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: B = None
        self.r: B = None
        self.txt = txt

c = A("c")
m = B("m")
b = C("b")
g = D("g")
n = E("n")
j = F("j")
e = G("e")
k = H("k")
a = C("a")

c.s = n
c.t = n
c.r = m
c.u = e
c.o = k
c.z = a
c.w = g
m.y = g
m.t = g
m.r = g
m.p = j
m.o = n
m.x = e
b.q = j
b.p = j
b.o = m
g.w = m
n.y = m
n.s = k
j.x = k
j.y = c
e.z = g
e.t = c
k.w = e
k.v = m
k.r = m
a.q = j
a.p = j
a.o = m
assert k.w.z.w.o.s.v.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.r: B = None
        self.u: G = None
        self.o: H = None
        self.z: C = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: F = None
        self.t: D = None
        self.o: E = None
        self.x: G = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: B = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: B = None
        self.r: B = None
        self.txt = txt

c = A("c")
m = B("m")
b = C("b")
g = D("g")
n = E("n")
j = F("j")
e = G("e")
k = H("k")
a = C("a")

c.s = n
c.t = n
c.r = m
c.u = e
c.o = k
c.z = a
c.w = g
m.y = g
m.t = g
m.r = g
m.p = j
m.o = n
m.x = e
b.q = j
b.p = j
b.o = m
g.w = m
n.y = m
n.s = k
j.x = k
j.y = c
e.z = g
e.t = c
k.w = e
k.v = m
k.r = m
a.q = j
a.p = j
a.o = m
assert k.w.z.w.o.s.v.p.txt == "j"