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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: E = None
        self.v: I = None
        self.w: F = None
        self.z: F = None
        self.s: A = None
        self.y: H = None
        self.p: F = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: G = None
        self.x: G = None
        self.w: I = None
        self.t: G = None
        self.o: B = None
        self.s: H = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: E = None
        self.v: I = None
        self.w: F = None
        self.z: F = None
        self.s: A = None
        self.y: H = None
        self.p: F = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: G = None
        self.x: G = None
        self.w: I = None
        self.t: G = None
        self.o: B = None
        self.s: H = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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