class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: B = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: G = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.w: C = None
        self.r: B = None
        self.x: C = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: G = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.w: C = None
        self.r: B = None
        self.x: C = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: E = None
        self.txt = txt

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

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

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