class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: C = None
        self.s: H = None
        self.t: E = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: C = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: H = None
        self.u: B = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: C = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: H = None
        self.u: B = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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