class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: D = None
        self.z: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: H = None
        self.v: A = None
        self.t: B = None
        self.y: B = None
        self.w: G = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: H = None
        self.v: A = None
        self.t: B = None
        self.y: B = None
        self.w: G = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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