class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: D = None
        self.z: G = None
        self.o: F = None
        self.p: A = None
        self.u: F = None
        self.r: A = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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