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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: G = None
        self.s: A = None
        self.x: G = None
        self.t: F = None
        self.q: D = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: C = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.r: B = None
        self.t: F = None
        self.s: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: G = None
        self.s: A = None
        self.x: G = None
        self.t: F = None
        self.q: D = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: C = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.r: B = None
        self.t: F = None
        self.s: F = None
        self.w: B = None
        self.txt = txt

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

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

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