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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: E = None
        self.r: B = None
        self.s: D = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: G = None
        self.u: C = None
        self.p: F = None
        self.x: H = None
        self.t: H = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: E = None
        self.r: H = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: H = None
        self.x: C = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: E = None
        self.r: B = None
        self.s: D = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: G = None
        self.u: C = None
        self.p: F = None
        self.x: H = None
        self.t: H = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: E = None
        self.r: H = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: H = None
        self.x: C = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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