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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: E = None
        self.w: G = None
        self.v: A = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.z: D = None
        self.s: B = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: B = None
        self.z: F = None
        self.t: E = None
        self.w: D = None
        self.v: A = None
        self.txt = txt

g = A("g")
e = B("e")
n = C("n")
b = D("b")
c = E("c")
a = F("a")
d = G("d")
j = H("j")

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: E = None
        self.w: G = None
        self.v: A = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.z: D = None
        self.s: B = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: B = None
        self.z: F = None
        self.t: E = None
        self.w: D = None
        self.v: A = None
        self.txt = txt

g = A("g")
e = B("e")
n = C("n")
b = D("b")
c = E("c")
a = F("a")
d = G("d")
j = H("j")

g.s = c
g.x = c
g.p = e
g.t = e
g.w = n
g.q = b
g.v = j
e.y = j
e.z = c
n.o = c
n.q = d
b.r = e
b.u = c
b.w = d
b.v = g
b.o = n
c.w = j
c.t = j
c.z = b
c.s = e
c.x = a
a.x = j
a.p = e
a.s = e
d.o = j
d.v = e
j.q = c
j.t = c
j.u = e
j.z = a
j.w = b
j.v = g
assert n.q.v.y.w.txt == "b"