class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: H = None
        self.v: D = None
        self.s: B = None
        self.q: E = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: H = None
        self.y: B = None
        self.s: H = None
        self.u: G = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: A = None
        self.u: F = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: G = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: H = None
        self.y: B = None
        self.s: H = None
        self.u: G = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: A = None
        self.u: F = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: G = None
        self.t: F = None
        self.txt = txt

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

m.u = b
m.y = g
m.w = g
m.v = f
m.s = e
m.q = n
j.w = f
j.p = g
j.s = g
j.y = h
j.u = b
j.x = c
l.x = g
l.p = m
l.u = c
l.q = j
f.p = l
f.u = l
f.q = n
f.t = c
f.s = j
n.v = l
n.t = m
c.r = m
b.v = e
b.p = e
b.r = c
b.q = l
b.x = l
b.u = n
b.t = m
g.q = l
g.y = b
g.t = c
e.w = f
e.p = g
e.s = g
e.y = j
e.u = b
e.x = c
h.w = f
h.p = g
h.s = g
h.y = e
h.u = b
h.x = c
assert e.w.s.x.r.txt == "m"