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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

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