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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: G = None
        self.w: G = None
        self.u: E = None
        self.o: A = None
        self.txt = txt

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

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

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

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

g.z = n
g.s = f
c.s = d
c.r = d
c.x = a
c.u = a
c.o = n
c.y = j
c.p = j
j.t = n
j.q = k
j.u = g
f.z = m
f.p = d
f.w = d
f.u = a
f.o = g
m.y = g
m.v = k
n.o = c
n.p = c
n.s = k
n.v = d
n.t = f
d.q = j
k.o = c
k.p = c
k.s = n
k.v = d
k.t = f
a.y = g
a.v = k
assert f.o.z.p.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: G = None
        self.w: G = None
        self.u: E = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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