class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: F = None
        self.x: E = None
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: B = None
        self.v: C = None
        self.o: A = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: A = None
        self.t: C = None
        self.v: D = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: C = None
        self.o: B = None
        self.z: F = None
        self.u: A = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: F = None
        self.x: E = None
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: B = None
        self.v: C = None
        self.o: A = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: A = None
        self.t: C = None
        self.v: D = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: C = None
        self.o: B = None
        self.z: F = None
        self.u: A = None
        self.w: E = None
        self.txt = txt

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

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