class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: C = None
        self.x: E = None
        self.p: F = None
        self.r: C = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: A = None
        self.o: G = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: D = None
        self.v: C = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: B = None
        self.q: A = None
        self.u: F = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: A = None
        self.o: G = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: D = None
        self.v: C = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: B = None
        self.q: A = None
        self.u: F = None
        self.t: A = None
        self.txt = txt

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

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