class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: E = None
        self.z: G = None
        self.p: H = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: A = None
        self.u: A = None
        self.z: G = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: A = None
        self.txt = txt

b = A("b")
n = B("n")
k = C("k")
h = D("h")
f = E("f")
i = F("i")
m = G("m")
c = H("c")
l = E("l")
g = E("g")

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: E = None
        self.z: G = None
        self.p: H = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: A = None
        self.u: A = None
        self.z: G = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: A = None
        self.txt = txt

b = A("b")
n = B("n")
k = C("k")
h = D("h")
f = E("f")
i = F("i")
m = G("m")
c = H("c")
l = E("l")
g = E("g")

b.y = h
n.z = l
n.p = c
n.t = m
k.w = c
k.p = c
k.q = f
k.r = f
k.z = m
h.x = n
h.p = n
h.w = k
h.t = k
h.r = b
h.u = c
h.s = i
f.x = b
f.y = b
f.u = b
f.z = m
f.r = i
i.x = c
i.r = b
m.x = i
m.q = i
c.v = h
c.w = b
l.x = b
l.y = b
l.u = b
l.z = m
l.r = i
g.x = b
g.y = b
g.u = b
g.z = m
g.r = i
assert l.y.y.t.p.w.y.r.y.r.txt == "b"