class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: G = None
        self.z: G = None
        self.t: E = None
        self.x: C = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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