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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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