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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

f = A("f")
l = B("l")
h = C("h")
g = D("g")
a = E("a")
c = F("c")
n = G("n")
j = D("j")
k = F("k")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

f = A("f")
l = B("l")
h = C("h")
g = D("g")
a = E("a")
c = F("c")
n = G("n")
j = D("j")
k = F("k")

f.v = c
f.r = h
f.x = h
f.y = l
f.t = k
f.p = n
f.o = a
l.w = n
l.y = g
h.p = k
h.x = a
h.y = n
h.r = f
g.p = f
g.r = h
g.u = h
g.o = a
g.w = a
g.x = k
a.o = n
a.s = n
a.p = j
c.q = n
n.t = k
j.p = f
j.r = h
j.u = h
j.o = a
j.w = a
j.x = k
k.q = n
assert g.r.p.q.t.q.t.txt == "k"