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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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