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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: A = None
        self.v: D = None
        self.z: E = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: A = None
        self.v: D = None
        self.z: E = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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