class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: F = None
        self.u: C = None
        self.t: H = None
        self.p: H = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: D = None
        self.s: C = None
        self.r: C = None
        self.z: A = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: F = None
        self.s: F = None
        self.z: A = None
        self.p: B = None
        self.u: G = None
        self.x: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: D = None
        self.s: C = None
        self.r: C = None
        self.z: A = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: F = None
        self.s: F = None
        self.z: A = None
        self.p: B = None
        self.u: G = None
        self.x: F = None
        self.txt = txt

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

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

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