class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: D = None
        self.v: H = None
        self.u: H = None
        self.w: F = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: H = None
        self.s: B = None
        self.v: E = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.q: B = None
        self.x: B = None
        self.v: F = None
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: C = None
        self.t: B = None
        self.z: G = None
        self.o: G = None
        self.w: C = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: H = None
        self.s: B = None
        self.v: E = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.q: B = None
        self.x: B = None
        self.v: F = None
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: C = None
        self.t: B = None
        self.z: G = None
        self.o: G = None
        self.w: C = None
        self.x: E = None
        self.txt = txt

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

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