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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: G = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: F = None
        self.v: F = None
        self.z: D = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.w: G = None
        self.x: C = None
        self.o: G = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: G = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: F = None
        self.v: F = None
        self.z: D = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.w: G = None
        self.x: C = None
        self.o: G = None
        self.v: A = None
        self.txt = txt

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

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

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