class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: H = None
        self.o: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: A = None
        self.r: G = None
        self.w: G = None
        self.y: B = None
        self.z: G = None
        self.v: F = None
        self.t: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: C = None
        self.u: F = None
        self.y: A = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: A = None
        self.r: G = None
        self.w: G = None
        self.y: B = None
        self.z: G = None
        self.v: F = None
        self.t: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: C = None
        self.u: F = None
        self.y: A = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

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

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