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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: D = None
        self.w: F = None
        self.x: C = None
        self.z: F = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: C = None
        self.o: E = None
        self.q: B = None
        self.u: C = None
        self.s: F = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: B = None
        self.y: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: D = None
        self.w: F = None
        self.x: C = None
        self.z: F = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: C = None
        self.o: E = None
        self.q: B = None
        self.u: C = None
        self.s: F = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: B = None
        self.y: C = None
        self.txt = txt

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

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

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