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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.q: G = None
        self.o: F = None
        self.y: F = None
        self.u: F = None
        self.s: C = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: D = None
        self.w: D = None
        self.z: D = None
        self.x: G = None
        self.txt = txt

n = A("n")
j = B("j")
k = C("k")
l = D("l")
d = E("d")
c = F("c")
e = G("e")
f = H("f")

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.q: G = None
        self.o: F = None
        self.y: F = None
        self.u: F = None
        self.s: C = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: D = None
        self.w: D = None
        self.z: D = None
        self.x: G = None
        self.txt = txt

n = A("n")
j = B("j")
k = C("k")
l = D("l")
d = E("d")
c = F("c")
e = G("e")
f = H("f")

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