class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.p: C = None
        self.z: I = None
        self.q: I = None
        self.o: H = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: G = None
        self.y: H = None
        self.v: H = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.z: G = None
        self.p: A = None
        self.y: A = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: I = None
        self.z: I = None
        self.y: F = None
        self.p: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: G = None
        self.y: H = None
        self.v: H = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.z: G = None
        self.p: A = None
        self.y: A = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: I = None
        self.z: I = None
        self.y: F = None
        self.p: B = None
        self.txt = txt

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

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

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