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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.v: B = None
        self.z: A = None
        self.s: D = None
        self.q: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

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

b = A("b")
k = B("k")
n = C("n")
g = D("g")
e = E("e")
f = F("f")
l = G("l")
j = B("j")

b.z = f
b.r = l
b.p = k
b.s = g
k.o = f
k.p = f
k.y = j
k.v = j
k.z = b
k.s = g
k.q = l
n.t = b
g.r = e
g.z = j
g.w = b
e.s = n
e.p = g
e.q = j
e.x = k
e.v = b
f.v = b
f.y = b
f.r = b
f.o = n
l.s = n
l.o = f
l.y = e
j.o = f
j.p = f
j.y = k
j.v = k
j.z = b
j.s = g
j.q = l
assert g.z.s.w.s.z.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: G = None
        self.p: B = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.v: B = None
        self.z: A = None
        self.s: D = None
        self.q: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

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

b = A("b")
k = B("k")
n = C("n")
g = D("g")
e = E("e")
f = F("f")
l = G("l")
j = B("j")

b.z = f
b.r = l
b.p = k
b.s = g
k.o = f
k.p = f
k.y = j
k.v = j
k.z = b
k.s = g
k.q = l
n.t = b
g.r = e
g.z = j
g.w = b
e.s = n
e.p = g
e.q = j
e.x = k
e.v = b
f.v = b
f.y = b
f.r = b
f.o = n
l.s = n
l.o = f
l.y = e
j.o = f
j.p = f
j.y = k
j.v = k
j.z = b
j.s = g
j.q = l
assert g.z.s.w.s.z.p.txt == "f"