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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.w: F = None
        self.x: B = None
        self.v: A = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.q: C = None
        self.v: E = None
        self.t: E = None
        self.s: E = None
        self.x: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.w: F = None
        self.x: B = None
        self.v: A = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.q: C = None
        self.v: E = None
        self.t: E = None
        self.s: E = None
        self.x: C = None
        self.txt = txt

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

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

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