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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.w: D = None
        self.u: C = None
        self.txt = txt

m = A("m")
j = B("j")
h = C("h")
a = D("a")
i = E("i")
n = F("n")
l = G("l")
c = D("c")
d = G("d")
k = D("k")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.w: D = None
        self.u: C = None
        self.txt = txt

m = A("m")
j = B("j")
h = C("h")
a = D("a")
i = E("i")
n = F("n")
l = G("l")
c = D("c")
d = G("d")
k = D("k")

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