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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: E = None
        self.r: F = None
        self.v: D = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: E = None
        self.q: H = None
        self.v: E = None
        self.r: G = None
        self.u: E = None
        self.t: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: D = None
        self.r: G = None
        self.txt = txt

f = A("f")
n = B("n")
g = C("g")
c = D("c")
b = E("b")
k = F("k")
i = G("i")
e = H("e")
j = A("j")

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: E = None
        self.r: F = None
        self.v: D = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: E = None
        self.q: H = None
        self.v: E = None
        self.r: G = None
        self.u: E = None
        self.t: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: D = None
        self.r: G = None
        self.txt = txt

f = A("f")
n = B("n")
g = C("g")
c = D("c")
b = E("b")
k = F("k")
i = G("i")
e = H("e")
j = A("j")

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