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

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: A = None
        self.y: F = None
        self.t: A = None
        self.q: H = None
        self.w: G = None
        self.x: D = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: E = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: H = None
        self.w: E = None
        self.r: C = None
        self.v: E = None
        self.t: D = None
        self.p: B = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: A = None
        self.y: F = None
        self.t: A = None
        self.q: H = None
        self.w: G = None
        self.x: D = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: E = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: H = None
        self.w: E = None
        self.r: C = None
        self.v: E = None
        self.t: D = None
        self.p: B = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

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

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