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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: F = None
        self.x: D = None
        self.y: G = None
        self.q: C = None
        self.z: H = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: D = None
        self.p: E = None
        self.v: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: F = None
        self.x: D = None
        self.y: G = None
        self.q: C = None
        self.z: H = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: D = None
        self.p: E = None
        self.v: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: E = None
        self.txt = txt

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

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