class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: G = None
        self.u: G = None
        self.w: B = None
        self.z: F = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: B = None
        self.y: C = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: B = None
        self.y: C = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

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

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