class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: C = None
        self.x: H = None
        self.p: F = None
        self.r: B = None
        self.t: F = None
        self.y: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: B = None
        self.y: A = None
        self.r: F = None
        self.u: C = None
        self.v: F = None
        self.z: E = None
        self.x: D = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: C = None
        self.x: H = None
        self.p: F = None
        self.r: B = None
        self.t: F = None
        self.y: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: B = None
        self.y: A = None
        self.r: F = None
        self.u: C = None
        self.v: F = None
        self.z: E = None
        self.x: D = None
        self.o: I = None
        self.txt = txt

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

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

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