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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: F = None
        self.o: H = None
        self.y: G = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.s: C = None
        self.p: B = None
        self.x: G = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: F = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: B = None
        self.t: E = None
        self.s: A = None
        self.q: A = None
        self.o: D = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: F = None
        self.o: H = None
        self.y: G = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.s: C = None
        self.p: B = None
        self.x: G = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: F = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: B = None
        self.t: E = None
        self.s: A = None
        self.q: A = None
        self.o: D = None
        self.v: F = None
        self.txt = txt

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

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