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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.z: F = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: G = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.z: F = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: G = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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